package com.zmy.xcx.dao.mapper;

import com.zmy.xcx.dao.entity.HypertensionMedication;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface HypertensionMedicationMapper {
    /**
     * 获取高血压用药列表
     * @return
     */
    @Select("select * from hypertension_medication")
    List<HypertensionMedication> getMedicineList();

    /**
     * 根据id添加点击量
     * @param id
     */
    @Update("update hypertension_medication set clicks = clicks + 1 where id = #{id}")
    void updateClicksById(Integer id);
}

